import request from '@/utils/http';

// 站点列表
export function locationAllList(params) {
	return request({
		url: '/anchor/platform/manager/new/tdBanner/get/location/all',
		method: 'get',
		params
	});
}
// 获取事业群
export function locationconfAll(params) {
	return request({
		url: '/anchor/platform/manager/new/tdBanner/get/locationconf/all',
		method: 'get',
		params
	});
}

// 获取Banner列表
export function tdBannerList(params) {
	return request({
		url: '/anchor/platform/manager/new/tdBanner/list',
		method: 'get',
		params
	});
}
// 获取产品列表
export function productAll(params) {
	return request({
		url: '/anchor/platform/manager/new/tdBanner/get/product/all',
		method: 'get',
		params
	});
}
//

// 新增产品banner
export function savePbanner(data) {
	return request({
		url: '/anchor/platform/manager/new/tdBanner/save/pbanner',
		method: 'post',
		data
	});
}
// 上移，下移，置顶
export function tdBannerMove(data) {
	return request({
		url: '/anchor/platform/manager/new/tdBanner/move',
		method: 'post',
		data
	});
}

// 下线banner
export function tdBannerOffline(data) {
	return request({
		url: '/anchor/platform/manager/new/tdBanner/offline',
		method: 'post',
		data
	});
}

//历史Banner列表
export function historyBannerList(params) {
	return request({
		url: '/anchor/platform/manager/new/tdBanner/history/list',
		method: 'get',
		params
	});
}

// 获取省份站点列表
export function provinceAll(params) {
	return request({
		url: '/anchor/platform/manager/new/tdBanner/get/province/all',
		method: 'get',
		params
	});
}

// 新增自定义banner
export function addCustomBanner(data) {
	return request({
		url: '/anchor/platform/manager/new/tdBanner/save/fbanner',
		method: 'post',
		data
	});
}
// 获取banner详情
export function bannerDetail(params) {
	return request({
		url: '/anchor/platform/manager/new/tdBanner/detail',
		method: 'get',
		params
	});
}

// 导出使用情况列表
export function historyListExport(params) {
	return request({
		url: '/anchor/platform/manager/new/tdBanner/history/list/export',
		method: 'get',
		params,
		responseType: 'arraybuffer'
	});
}

// 更换图片
export function tdBannerReplace(data) {
	return request({
		url: '/anchor/platform/manager/new/tdBanner/replace-pic',
		method: 'post',
		data
	});
}

// 获取Banner列表 - 区总/分总
export function areaTdBannerList(params) {
	return request({
		url: '/anchor/platform/manager/new/tdBanner/list/area-manager',
		method: 'get',
		params
	});
}

//历史Banner列表 - 区总/分总
export function areaHistoryBannerList(params) {
	return request({
		url: '/anchor/platform/manager/new/tdBanner/history/list/area-manager',
		method: 'get',
		params
	});
}

// 导出使用情况列表
export function areaHistoryListExport(params) {
	return request({
		url: '/anchor/platform/manager/new/tdBanner/history/list/export/area-manager',
		method: 'get',
		params,
		responseType: 'arraybuffer'
	});
}
